/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 全局容器 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 标题样式 */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: white;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 表单和输入框 */
form {
    margin: 10px 0;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    margin: 5px 0;
}

input[type="number"] {
    width: 80px;
}

/* 按钮样式 */
button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"] {
    background-color: #3498db;
    color: white;
}

button[type="submit"]:hover {
    background-color: #2980b9;
}

/* 删除按钮特殊样式 */
form[action*="remove"] button {
    background-color: #e74c3c;
}

form[action*="remove"] button:hover {
    background-color: #c0392b;
}

/* 提示信息 */
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 导航链接 */
a {
    color: #3498db;
    text-decoration: none;
    margin-right: 15px;
}

a:hover {
    text-decoration: underline;
}

/* 购物车统计 */
.cart-link {
    margin-top: 20px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

/* 订单总计 */
tr:last-child td {
    font-weight: bold;
    background-color: #ecf0f1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 10px;
    }

    table {
        font-size: 14px;
    }

    input[type="number"] {
        width: 60px;
    }
}